CREATE TABLE [dbo].[Receive]
(
[IsOpened] [bit] NOT NULL CONSTRAINT [DF_Receive_IsOpened] DEFAULT ((0)),
[OpenedDate] [datetime] NULL,
[MessageId] [int] NOT NULL,
[MemberId] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Receive] ADD CONSTRAINT [FK_Receive_Member] FOREIGN KEY ([MemberId]) REFERENCES [dbo].[Member] ([Id])
GO
ALTER TABLE [dbo].[Receive] ADD CONSTRAINT [FK_Receive_Message] FOREIGN KEY ([MessageId]) REFERENCES [dbo].[Message] ([Id])
GO
